package com.hailian.fintech.hlbackingserver.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.hailian.fintech.hlbackingserver.entity.Account;
import com.hailian.fintech.hlbackingserver.mapper.AccountMapper;
import com.hailian.fintech.hlbackingserver.service.IAccountService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hailian.fintech.hlcomm_interfaceserver.entity.POJO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author wk
 * @since 2020-05-30
 */
@Service
public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> implements IAccountService {

    @Autowired
    private AccountMapper accountMapper;

    @Override
    public PageInfo getByUid(Integer uid, Integer pageSize, Integer pageNum, POJO pojo) {
        PageHelper.startPage(pageNum,pageSize);
        List accounts = accountMapper.getByUid(uid,pojo);
        return new PageInfo(accounts);
    }

    @Override
    public List<Account> selectToAddJiaoYi(String pojo) {
        return accountMapper.selectToAddJiaoYi(pojo);
    }

    @Override
    public List<Account> selectTiXianAccount(String operationType) {
        return accountMapper.selectTiXianAccount(operationType);
    }
}
